package com.miracle.controller;

import jdk.nashorn.internal.ir.annotations.Reference;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author jie.xi
 * @date 2022年04月28日 12:34
 */
@RestController
@Slf4j
@RefreshScope
public class TestController {

    @Value("${user.name}")
    private String name;

    @RequestMapping("/test/test")
    public String testController(){
        log.info("当前获取配置的name为：[{}]",name);
        return "当前获取配置中的name为："+name;
    }
}
